package polymorphic.homework2;

public class Test {
    public static void main(String[] args) {
        Ape ape=new Ape("黑黑");
        ape.speak();
        ape = new Person("白白");
        ape.speak();
        if (ape instanceof Person) {
            Person person =(Person)ape;
            person.think();
        }
    }
}